home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-08-16 | 5.7 KB | 167 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: Frame.h
- // Release Version: $ ODF 1 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef FRAME_H
- #define FRAME_H
-
- // ----- Part Layer -----
-
- #ifndef FWFRMING_H
- #include "FWFrming.h"
- #endif
-
- #ifndef FWDRGDRP_H
- #include "FWDrgDrp.h"
- #endif
-
- //========================================================================================
- // Forward Declarations
- //========================================================================================
-
- class FW_CPresentation;
- class FW_CGrowBox;
-
- class CContainerPart;
- class CContainerSelection;
-
- //========================================================================================
- // CContainerFrame
- //========================================================================================
-
- class CContainerFrame : public FW_CEmbeddingFrame, public FW_MDraggableFrame, public FW_MDroppableFrame
- {
- public:
- FW_DECLARE_CLASS
- FW_DECLARE_AUTO(CContainerFrame)
-
- //----------------------------------------------------------------------------------------
- // Initialization/destruction
- //
- public:
- CContainerFrame(Environment* ev,
- ODFrame* odFrame,
- FW_CPresentation* presentation,
- CContainerPart* part,
- FW_ResourceId id = 0);
- virtual ~ CContainerFrame();
-
- //----------------------------------------------------------------------------------------
- // Inherited API
- //
- public:
- // ----- Menu
- virtual FW_Boolean DoAdjustMenus(Environment* ev, FW_CMenuBar* menuBar, FW_Boolean hasMenuFocus, FW_Boolean isRoot);
- virtual FW_Boolean DoMenu(Environment* ev, const FW_CMenuEvent& theMenuEvent);
-
- // ----- Events -----
- virtual void DoActivateEvent(Environment* ev, const FW_CActivateEvent& theActivateEvent);
-
- // ----- Embedded Mouse Events -----
- virtual FW_Boolean DoMouseDownInEmbeddedFrameBorder(Environment* ev,
- const FW_CBorderMouseEvent& theBorderMouseEvent);
- virtual FW_Boolean DoMouseDownInEmbeddedFrame(Environment* ev,
- const FW_CEmbeddedMouseEvent& theEmbeddedMouseEvent);
-
- // ----- Embedding -----
- virtual ODFacet* CreateEmbeddedFacet(Environment* ev,
- ODFacet* embeddingFacet,
- FW_MProxy* proxy,
- ODFrame* embeddedFrame,
- ODShape* proposedClipShape);
-
- // ----- Frame activation -----
- virtual void FocusStateChanged(Environment* ev,
- ODTypeToken focus,
- FW_Boolean newState,
- ODFrame* newOwner);
-
- // ----- Geometry -----
- virtual void GeometryChanged(Environment* ev,
- ODFacet* odFacet,
- FW_Boolean clipShapeChanged,
- FW_Boolean externalTransformChanged);
-
- // ----- Drag and Drop -----
- virtual ODDragResult CanAcceptDrop(Environment* ev, ODDragItemIterator* dragInfo);
-
- // ----- Views -----
- virtual void PostCreateViewFromStream(Environment* ev);
-
- // ----- Drawing -----
- virtual void Draw(Environment* ev, ODFacet* odFacet, ODShape* invalidShape);
-
- // ----- Commands Factory -----
- virtual FW_CClipboardCommand* NewClipboardCommand(Environment* ev, ODCommandID commandID);
- virtual FW_CInsertCommand* NewInsertCommand(Environment* ev, const FW_PFileSpecification& fileSpec);
- virtual FW_CDragCommand* NewDragCommand(Environment* ev,
- FW_CFrame* theFrame,
- const FW_CMouseEvent& theMouseEvent);
- virtual FW_CDropCommand* NewDropCommand(Environment* ev, FW_CFrame* frame,
- ODDragItemIterator* dropInfo,
- ODFacet* facet, const FW_CPoint& windowPoint);
-
- // ----- RequestEmbeddedFrame -----
- virtual FW_MProxy* EmbeddedFrameRequested(Environment *ev,
- FW_MProxy* baseProxy,
- ODFrame* baseFrame,
- ODShape* frameShape,
- ODPart* embeddedPart,
- ODTypeToken viewType,
- ODTypeToken presentation,
- ODID frameGroupID,
- FW_Boolean isOverlaid,
- FW_Boolean isSubFrame);
- // ----- Internalize/Externalize -----
- virtual void ExternalizeFrame(Environment* ev, ODStorageUnitView* storageUnitView);
- virtual void InternalizeFrame(Environment* ev, ODStorageUnitView* storageUnitView);
-
- // ----- Window Size ------
- virtual void AdjustZoomedWindowSize(Environment* ev, FW_CPoint& proposedSize);
- virtual void AdjustWindowGrowLimits(Environment* ev, FW_CPoint& minSize, FW_CPoint& maxSize);
-
- //----------------------------------------------------------------------------------------
- // New API
- //
- public:
- CContainerSelection* GetSelection(Environment* ev);
- FW_Fixed GetZoomFactor(Environment *ev) const;
- void ChangeZoomFactor(Environment* ev, FW_Fixed zoomFactor);
-
- FW_CRect GetContentRect(Environment* ev) const;
- void AdjustContentViewSize(Environment* ev, FW_Boolean refresh);
-
- //----------------------------------------------------------------------------------------
- // Data Members
- //
- private:
- CContainerPart* fContainerPart;
- CContainerSelection* fSelection;
-
- FW_Fixed fZoomFactor;
- };
-
- //----------------------------------------------------------------------------------------
- // CContainerFrame::GetZoomFactor
- //----------------------------------------------------------------------------------------
- inline FW_Fixed CContainerFrame::GetZoomFactor(Environment *ev) const
- {
- return fZoomFactor;
- }
-
- //----------------------------------------------------------------------------------------
- // CContainerFrame::GetSelection
- //----------------------------------------------------------------------------------------
- inline CContainerSelection* CContainerFrame::GetSelection(Environment *ev)
- {
- return fSelection;
- }
-
-
- #endif
-